package com.miracle.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.miracle.system.base.domain.BaseEntity;
import org.springframework.data.annotation.Transient;

import java.util.Date;
import java.util.List;

/**
 * @author ：miracle.cui
 * @description：TODO
 * @date ：2020/7/22 9:50
 */
public class SysRole extends BaseEntity {

    //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    /**
     * 角色ID
     */
    private Integer roleId;

    /**
     * 角色编码
     */
    private String roleCode;

    /**
     * 角色名称
     */
    private String roleName;

    /**
     * 角色类型
     */
    private String roleType;

    /**
     * 角色描述
     */
    private String roleDesc;

    /**
     * 删除标记
     */
    private String delSign;

    /**
     * 生效日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date validDate = new Date();

    /**
     * 失效日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date invalidDate;

    /**
    * 角色状态
    */
    private String status;

    private List<SysResource> roleResources;
    private List<TreeEntity> resourceTree;

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleType() {
        return roleType;
    }

    public void setRoleType(String roleType) {
        this.roleType = roleType;
    }

    public String getRoleDesc() {
        return roleDesc;
    }

    public void setRoleDesc(String roleDesc) {
        this.roleDesc = roleDesc;
    }

    public Date getValidDate() {
        return validDate;
    }

    public void setValidDate(Date validDate) {
        this.validDate = validDate;
    }

    public Date getInvalidDate() {
        return invalidDate;
    }

    public void setInvalidDate(Date invalidDate) {
        this.invalidDate = invalidDate;
    }

    public List<SysResource> getRoleResources() {
        return roleResources;
    }

    public void setRoleResources(List<SysResource> roleResources) {
        this.roleResources = roleResources;
    }

    public String getDelSign() {
        return delSign;
    }

    public void setDelSign(String delSign) {
        this.delSign = delSign;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public List<TreeEntity> getResourceTree() {
        return resourceTree;
    }

    public void setResourceTree(List<TreeEntity> resourceTree) {
        this.resourceTree = resourceTree;
    }
}
